//
//  VideoPlayerController.m
//  tagPlayerModule
//
//  Created by liqian on 2018/10/23.
//  Copyright © 2018年 liqian. All rights reserved.
//

#import "VideoPlayerController.h"
#import "VideoPlayerView.h"

@interface VideoPlayerController ()

@property (nonatomic, strong) VideoPlayerView * videoView;
@end

@implementation VideoPlayerController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self lqkinInitView];
}

- (void)lqkinInitView{
    CGFloat deviceWith = [UIScreen mainScreen].bounds.size.width;
    CGFloat height = [UIScreen mainScreen].bounds.size.height;
    self.videoView = [[VideoPlayerView alloc]initWithFrame:CGRectMake(0, 0, deviceWith, height)];
    
    self.videoView.videoUrlStr = self.pathUrl;
    
    [self.view addSubview:self.videoView];
}

- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [self.videoView destroyPlayer];
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    
    [self dismissViewControllerAnimated:YES completion:nil];
}
@end
